<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title th:text="'我的'+${userIntegralRuleName['name']}"></title>
    <div data-th-replace="layout/head"></div>
    <!--初始公共加载过渡动画-->
    <script type="text/javascript" th:src='@{{path}/front/mobile/libs/page-loading.min.js?v={v}(path=${staticPath}, v=${v})}' charset="utf-8"></script>
</head>
<body>
<header class="bar bar-nav">
    <a class="button button-link button-nav pull-left" onclick="goBack();">
        <span class="iconfont icon-fanhui"></span>
    </a>
    <a href="/mobile/uc/integral/integralRuleInfo" class="button button-link button-nav pull-right">
        <span class="fs4 c-fff vam"> 规则说明</span>
    </a>
    <h1 class='title' th:text="'我的'+${userIntegralRuleName['name']}">我的积分</h1>
</header>
<div class="content wm-content order-content of">
    <article class="">
        <div class="page-group">
            <div id="page-infinite-scroll-bottom" class="page page-current">
                <div class="content infinite-scroll native-scroll record_wrap" data-type='auto' data-distance="100">
                    <div class="integral-data__wrap">
                        <section class="">
                            <span class="integral-txt-opt fs6" th:text="${userIntegralRuleName['name']}+'概况'"></span>
                        </section>
                        <section class="text-center" id="prompt">
                            <strong class="" style="font-size: 2rem;"  th:text="${userIntegral['currentScore']}">0</strong>
                            <span class="integral-txt-opt fs7" th:text="'可用'+${userIntegralRuleName['name']}"></span>
                            <span class="integral-txt-opt"><i class="icon iconfont icon-jubao fs7"></i></span>
                        </section>
                        <section class="text-center integral-btn__wrap mt5">
                            <button class="button button-warning button-round" th:if="${userIntegralRuleRatto['isMoney']}=='on'" id="toExchangeRmb">兑现金</button>
                            <a href="/mobile/uc/integral/integralGiftIndex" th:if="${userIntegralRuleRatto['isGoods']}=='on'" class="button button-warning button-round">兑礼品</a>
                        </section>
                        <section class="text-center integral-txt-opt fs6 mt5 pt5">
                            <span class="vam">累计获得 </span>
                            <span class="vam" th:text="${userIntegral['totalScore']}+${userIntegralRuleName['name']}">0</span>
                            <span class="vam"  th:text="${userIntegralRuleName['name']}+'已消耗'"> </span>
                            <span class="vam" th:text="${userIntegral['consumeScore']}">0</span>
                            <br>
                            <span class="vam" th:if="${userIntegralRuleRatto['isMoney']}=='on'">成功兑换 ￥</span>
                            <span class="vam"  th:if="${userIntegralRuleRatto['isMoney']}=='on'" th:text="${userIntegral['changeAmount']}">0</span>
                            <span class="vam" th:if="${userIntegralRuleRatto['isMoney']}=='on'"> 元！</span>
                            <span class="vam" th:if="${userIntegralRuleRatto['isGoods']}=='on'">成功兑换 </span>
                            <span class="vam" th:if="${userIntegralRuleRatto['isGoods']}=='on'" th:text="${userIntegral['exchangeNum']}">0</span>
                            <span class="vam" th:if="${userIntegralRuleRatto['isGoods']}=='on'"> 件礼品！</span>
                        </section>
                    </div>
                    <!--积分推广 广告位 开始-->
                    <div class="pl5 pr5 pt5" id="invitation" th:attrappend="data-desc=${userIntegralRuleByInvite['title']}" th:if="${userIntegralRuleByInvite['switch']} eq 'on'">
                        <section class="integral-ads-bx">
                            <img  style="max-height:120px;" th:src="${userIntegralRuleByInvite['src']} eq ''?${staticPath}+'/front/mobile/v3/img/uc/integral-ads-default-pic.png':${userIntegralRuleByInvite['src']}" width="100%">
                        </section>
                    </div>
                    <!--积分推广 广告位 结束-->
                    <div class="card">
                        <div class="card-header">
                            <span class="c-000 fs7"  th:text="${userIntegralRuleName['name']}+'变动记录'"></span>
                            <aside id="integral-cm-tabs">
                                <span class="wm-cm-tabs active"  data-value="2"><span class="c-888 fs6 vam">获得</span></span>
                                <span class="wm-cm-tabs ml5" data-value="1"><span class="c-888 fs6 vam"  >消耗</span></span>
                            </aside>
                        </div>
                        <div class="card-content">
                            <div class="card-content-inner" >
                                <input type="hidden" id="rType" value="2"/>
                                <div class="list-block">
                                    <div class="pl75">
                                        <section class="wm-loadingEle-content-inner i-media-list mr5">
                                            <section id="integral-list-2" class="intergral-list-box intergral-list-2"></section>
                                            <section id="integral-list-1" class="intergral-list-box intergral-list-1 hide"></section>
                                        </section>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </article>
</div>
<!--兑换人民币-->
<textarea id="toExchangeRmbEle" class="hide">
        <div class="toExchangeRmbEle pr">
            <section class="text-center">
                <h3 style="margin: 0;font-weight: 200"><span class="c-000" th:text="${userIntegralRuleName['name']}+'兑换人民币'"></span></h3>
            </section>
            <section class="pt5 text-left">
                <p class="fs6">
                    <span class="c-888">兑换比例</span>
                    <span class="c-888" id="scale" th:text="${userIntegralRuleRatto['integral']}+':'+ ${userIntegralRuleRatto['money']}">1000:1</span>
                </p>
            </section>
            <section class="mt5 item-input">
                <input type="number" name="cash" placeholder="请输入兑换数量">
            </section>
            <section class="mt5">
                <div class="row fs6">
                    <section class="col-50">
                        <span class="c-888" th:text="${userIntegralRuleName['name']}"></span>
                        <span class="c-888" th:text="${userIntegral['currentScore']}">0</span>
                    </section>
                    <section class="col-50 text-right">
                        <span class="c-000">RMB</span>
                        <span class="c-red" id="money">0.00</span>
                        <span class="c-000">元</span>
                    </section>
                </div>
            </section>
        </div>
    </textarea>
<div data-th-replace="layout/footer"></div>
<script type="text/javascript" th:src="@{{path}/front/mobile/business/integral/u-integral.js?v={v}(path=${staticPath},v=${v})}"></script>
<script th:inline="javascript">
    var protectDay = [[${userIntegralRuleByProtect['day']}]];
    var protectScore = [[${userIntegral['protectScore']}]];
    var userIntegralRuleName = [[${userIntegralRuleName['name']}]];
    var currentScore = [[${userIntegral['currentScore']}]];
    var integral = [[${userIntegralRuleRatto['integral']}]];
    var money = [[${userIntegralRuleRatto['money']}]];
    var validTime = [[${userIntegralRuleByValidtime}]];
</script>
</body>
</html>
